package com.rain.builder;

import com.rain.utils.Constants;
import com.rain.utils.DateUtils;

import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Date;

public class BuildComment {

    public static void createClassComment(BufferedWriter bufferedWriter,String classComment) throws IOException {

        bufferedWriter.write("/**");
        bufferedWriter.newLine();
        bufferedWriter.write(" * @auther: " + Constants.AUTHER);
        bufferedWriter.newLine();
        bufferedWriter.write(" * @description: " + classComment);
        bufferedWriter.newLine();
        bufferedWriter.write(" * @date: " + DateUtils.format(new Date(), DateUtils.YYYY_MM_DD));
        bufferedWriter.newLine();
        bufferedWriter.write(" */");
        bufferedWriter.newLine();


    }
    public static void createFieldComment(BufferedWriter bufferedWriter,String filedComment) throws IOException {
        bufferedWriter.write("\t/**");
        bufferedWriter.newLine();
        bufferedWriter.write("\t * " + (filedComment == null ? " " : filedComment));
        bufferedWriter.newLine();
        bufferedWriter.write("\t */");
        bufferedWriter.newLine();
    }
    public static void createMethodComment(){

    }

}
